validPhone_valid = function () {
    var id = device.tcDeviceId();
    loge("远程注册设备...");
    var url = "https://gitee.com/baishui0212/redbook/raw/master/" + id;
    var x;
    try {
        x = http.httpGetDefault(url, 5 * 1000);
    } catch (e) {
        x = "";
        loge("request error {}", e);
    }
    var index = x.indexOf("OK");
    logd("valid flag {}", index);
    if (index === -1) {
        return false;
    }
    return true;
};

validPhone_valid();